package com.example.xxljob.executor;

import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author 王令
 * @date 2022-04-27 10-51-51
 * @desc 定时任务业务逻辑
 */
@Slf4j
@Component
public class ExampleJobHandler {

    @XxlJob("sayHello")
    public void sayHello(String param) {
        XxlJobHelper.log("XXL-JOB, Hello: {}", param);
        log.info("XXL-JOB, Hello: {}", param);
    }
}
